<template>
	<view class="detail">
		<view class="mod_slider">
			<!-- 轮播 -->
			<swiper class="swiperbg" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
				<swiper-item v-for="(item,index) in partData.loopImgUrl">
					<image class="img_item" :src="item" mode="aspectFill"></image>
				</swiper-item>
			</swiper>
			<!-- 商品信息 -->
			<view class="buy_area">
				<text class="textWrap">{{partData.title}}</text>
				<text class="priceWrap">¥{{partData.price}}</text>
				<view>
					<infocell title='支付' :desc='baitiaoSelectItem.desc' @popView='popBaitiaoView'></infocell>
				</view>

			</view>
		</view>


	</view>
</template>

<script>
	import data_jhf from '../../utils/data_jhf';
	import infocell from "../../components/infocell.vue"

	export default {
		data() {
			return {
				partData: {},
				baitiao: [],
				baitiaoSelectItem: {
					desc: "【白条支付】首单享立减优惠"
				},
				hideBaitiao: true, // 是否隐藏白条的遮罩
				hideBuy: true, // 是否购买的遮罩
				badgeCount: 0
			}
		},
		methods: {
			popBaitiaoView() {
				console.log('popBaitiaoView')
			}
		},
		components: {
			'infocell': infocell
		},
		onLoad(option) {

			uni.showLoading({
				title: '加载中',
				mask: false
			});
			setTimeout(() => {
				uni.hideLoading()
				this.partData = data_jhf.productionDetail.partData
				this.baitiao = data_jhf.productionDetail.baitiao
			}, 1000);

		}

	}
</script>

<style>
	.detail {
		display: flex;
		flex-direction: column;
		width: 100%;
	}

	.mod_slider {
		background-color: white;
		width: 100%;
		height: auto;
	}

	.swiperbg {
		width: 100%;
		height: 820upx;
	}

	.img_item {
		display: block;
		width: 100%;
		height: 100%;
	}
</style>
